{extend name="base"}
{block name="title"}代理转账统计{/block}
{block name="head"}
<style>
.border-table tbody th{text-align:center; color:#333; font-weight:400; padding-left:5px;}
.border-table{font-size:12px; color:#666;}
</style>
{/block}
{block name="body"}
<body class="mainbody">
<form>
<!--导航栏-->
<div class="location">
  <a href="javascript:history.back(-1);" class="back"><i class="iconfont icon-up"></i><span>返回上一页</span></a>
  <a href="{:url('index/home')}" class="home"><i class="iconfont icon-home"></i><span>首页</span></a>
  <i class="arrow iconfont icon-arrow-right"></i>
  <span>代理转账统计</span>
</div>
<!--/导航栏-->

<!--工具栏-->
<div id="floatHead" class="toolbar-wrap">
  <div class="toolbar">
    <div class="box-wrap">
      <a class="menu-btn"><i class="iconfont icon-more"></i></a>
      <div class="l-list">
        <div class="menu-list">
          <div class="rule-single-select">
            <select name="channel" style="display:none">
              <option value="-1">===所有渠道===</option>
              {volist name="CHANNELS" id="val"}
              <option value="{$key}"{eq name="channel" value="$key"} selected{/eq}>[{$key}]{$val.Name}</option>
              {/volist}
            </select>
          </div>
          <input type="text" class="input txt" autocomplete="off" name="search" value="{$search|default=''|htmlentities}" placeholder="邀请码/代理姓名" />
          <a class="btn-search"><i class="iconfont icon-search"></i></a>
        </div>
      </div>
    </div>
  </div>
</div>
<!--/工具栏-->

<!--列表-->
<div class="table-container">
<table class="border-table ltable">
  <tr>
    <th rowspan="2">#</th>
    <th rowspan="2">渠道</th>
    <th rowspan="2">代理/头像/姓名/邀请码</th>
    <th rowspan="2">当前房卡</th>
    <th rowspan="2">绑定人数</th>
    <th colspan="2">今日销售</th>
    <th colspan="2">昨日销售</th>
    <th colspan="2">本周销售</th>
    <th colspan="2">上周销售</th>
    <th colspan="2">本月销售</th>
    <th colspan="2">上月销售</th>
    <th colspan="2">累计</th>
  </tr>
  <tr>
    <th>笔数</th>
    <th>总额</th>
    <th>笔数</th>
    <th>总额</th>
    <th>笔数</th>
    <th>总额</th>
    <th>笔数</th>
    <th>总额</th>
    <th>笔数</th>
    <th>总额</th>
    <th>笔数</th>
    <th>总额</th>
    <th>笔数</th>
    <th>总额</th>
  </tr>
{empty name="list"}
  <tr><td colspan="19">Oh~暂无数据!</td></tr>
{else}
  {volist name="list" id="v"}
  <tr data-auid="{$v.UserID}">
    <td>{$i}</td>
    <td title="{$v.Channel}">{$CHANNELS[$v.Channel]['Name'] ?? '--'}</td>
    <td class="user-avatar">
      <a target="_blank" href="{:url('user.detail/index')}?UserID={$v.UserID}"><img src="{$v.HeadImgUrl?:'__STATIC__/houtai/images/dface.png'}" /></a>
      <div class="user-box">
        <h4><a target="_blank" class="at_{$v.AccountsType}" href="{:url('user.detail/index')}?UserID={$v.UserID}">{:htmlentities($v.Compellation)}</a></h4>
        <i>[{$v.GameID}][{$v.AgentLevel}]级</i>
      </div>
    </td>
    <td>{$v.RoomCard}</td>
    <td><a target="_blank" href="{:url('user.agent.bind/index')}?search2={$v.GameID}">{$v.BindCount}</a></td>
    <td><a target="_blank" href="{:url('user.agent.pay/history')}?search1={$v.GameID}&time1={$TIMES.0.0}&time2={$TIMES.0.1}">{$v.SaleCount0}</a></td>
    <td>{$v.SaleTotal0}</td>
    <td><a target="_blank" href="{:url('user.agent.pay/history')}?search1={$v.GameID}&time1={$TIMES.1.0}&time2={$TIMES.1.1}">{$v.SaleCount1}</a></td>
    <td>{$v.SaleTotal1}</td>
    <td><a target="_blank" href="{:url('user.agent.pay/history')}?search1={$v.GameID}&time1={$TIMES.2.0}&time2={$TIMES.2.1}">{$v.SaleCount2}</a></td>
    <td>{$v.SaleTotal2}</td>
    <td><a target="_blank" href="{:url('user.agent.pay/history')}?search1={$v.GameID}&time1={$TIMES.3.0}&time2={$TIMES.3.1}">{$v.SaleCount3}</a></td>
    <td>{$v.SaleTotal3}</td>
    <td><a target="_blank" href="{:url('user.agent.pay/history')}?search1={$v.GameID}&time1={$TIMES.4.0}&time2={$TIMES.4.1}">{$v.SaleCount4}</a></td>
    <td>{$v.SaleTotal4}</td>
    <td><a target="_blank" href="{:url('user.agent.pay/history')}?search1={$v.GameID}&time1={$TIMES.5.0}&time2={$TIMES.5.1}">{$v.SaleCount5}</a></td>
    <td>{$v.SaleTotal5}</td>
    <td><a target="_blank" href="{:url('user.agent.pay/history')}?search1={$v.GameID}">{$v.SaleCount}</a></td>
    <td>{$v.SaleTotal}</td>
  </tr>
  {/volist}
{/empty}
</table>
</div>
<!--/列表-->

<!--内容底部-->
<div class="page-footer"><div class="btn-wrap">{$list->render()}</div></div>
<!--/内容底部-->

</form>
</body>
{/block}